package ynu.edu.controller;


import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import ynu.edu.common.controller.LogicController;
import ynu.edu.dao.OrderDao;
import ynu.edu.entity.Order1;
import ynu.edu.service.OrderService;


@Api(tags = "订单实体的控制器")
@RestController
@RequestMapping("/order")
public class OrderController extends LogicController<OrderService, OrderDao, Order1,Long> {
    public OrderController(@Autowired OrderService service){
        super(service);
    }
    @GetMapping("/getOrderById")
    public Order1 getOrderById(@RequestParam("orderId")Long orderId){
        return getService().GET(orderId);
    }
}